package com.ck.ips.dao;

import com.ck.common.model.DeviceGroup;
import com.ck.ips.model.vo.DeviceGroupTreeHierarchyVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 设备分组mapper
 * @Author: hf
 * @Date: 2019/5/6 17:33
 * @Version: 1.0
 */
public interface DeviceGroupMapper {


    DeviceGroup getDeviceGroupByGroupName(String groupName);

    int saveDeviceGroup(DeviceGroup deviceGroup);

    int updateDeviceGroup(DeviceGroup deviceGroup);

    DeviceGroup getDeviceGroupById(Long deviceGroupId);

    int deleteDeviceGroupById(Long deviceGroupId);

    List<DeviceGroup> listDeviceGroupByParentId(Long parentId);

    List<DeviceGroupTreeHierarchyVO> listAllDeviceGroupTree(@Param("resolvingPowers") List<String> resolvingPower);

    void moveDeviceGroup(@Param("deviceGroupId") Long deviceGroupId, @Param("deviceCodes") List<String> asList);

    List<Long> getDeviceGroupIdsByUserId(@Param("userId") Long userId);

    List<Long> getDeviceGroupIdsByRoleId(@Param("roleId") Long roleId);
}